Visible light communication is an emerging short-range high-speed wireless light communications technology that is developed on a basis of an LED technology. A basic principle of visible light communication is that communication is performed by flashing an LED light source at a high frequency based on a characteristic that a switching speed of a light emitting diode (LED) is higher than that of a fluorescent lamp and an incandescent lamp. Presence of light represents binary 1, and absence of light represents binary 0. Information may be obtained after a high-speed light signal that includes digital information undergoes photoelectric conversion. In the wireless light communications technology, data is unlikely to be interfered with or captured, and an optical communication device can be easily made and is unlikely to be damaged or degaussed. Therefore, the wireless light communications technology can be used to make a wireless optical encryption key. Compared with microwave technologies, the wireless light communication has abundant spectrum resources, which is incomparable with general microwave communication and wireless communication. In addition, the visible light communication is applicable to any communications protocol, and applicable to any environment. In terms of security, in contrast to conventional magnetic materials, there is no need to worry about a problem of degaussing or even to worry about unlawful interception of communication content; and a wireless optical communication device features flexible and convenient installation and layout, and a low cost, and is applicable to large-scale popularity and application.
With fast promotion of visible light communication, a technology of using an LED (light emitting diode) of an electronic device to transmit a visible light signal has been proposed. In the electronic device, a duration in which the LED is on and a duration in which the LED is off may be controlled, where on and off may respectively indicate a high level and a low level. Therefore, a specially set encoding mode may be used to achieve an objective of transmitting, by the LED, a visible light signal that represents data information. However, during practice, the inventors of the present application find that reliability of information transmitted in a conventional method is lower than an expected value.